home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 049b.dms / 049b.adf / andrew_smith_source / Zoom.AMOS / Zoom.amosSourceCode
AMOS Source Code  |  1992-02-26  |  1KB  |  83 lines

  1. ' Zoom block 
  2.  
  3. Screen Open 0,320,256,32,Lowres
  4. Flash Off : Curs Off 
  5.  
  6. Load Iff Fsel$("","","Load an IFF piccy","")
  7.  
  8. ' Open hidden screen 
  9.  
  10. Screen Open 1,320,256,32,Lowres
  11. Flash Off : Curs Off 
  12. Screen To Back 1
  13.  
  14. Screen 0
  15.  
  16. ' First get block
  17.  
  18. ' Anchor first point 
  19.  
  20. Repeat 
  21.    X1=X Screen(X Mouse)
  22.    Y1=Y Screen(Y Mouse)
  23. Until Mouse Click=1
  24.  
  25. ' Get second point 
  26.  
  27. Gr Writing 3
  28.  
  29. Repeat 
  30.    X2=X Screen(X Mouse)
  31.    Y2=Y Screen(Y Mouse)
  32.    Box X1,Y1 To X2,Y2
  33.    Wait Vbl 
  34.    Box X1,Y1 To X2,Y2
  35. Until Mouse Click=1
  36.  
  37. SIZEX=X2-X1 : SIZEY=Y2-Y1
  38.  
  39. Gr Writing 0
  40.  
  41. Get Bob 1,X1,Y1 To X2,Y2
  42.  
  43. Cls 0
  44.  
  45. Gr Writing 3
  46.  
  47. Repeat 
  48.    X=X Screen(X Mouse)
  49.    Y=Y Screen(Y Mouse)
  50.    Box X,Y To X+SIZEX,Y+SIZEY
  51.    Wait Vbl 
  52.    Box X,Y To X+SIZEX,Y+SIZEY
  53. Until Mouse Click=1
  54.  
  55. Gr Writing 0
  56.  
  57. Paste Bob X,Y,1
  58.  
  59. Bob Off 
  60.  
  61. Screen To Front 1
  62.  
  63. Screen 1
  64.  
  65. Cls 0
  66.  
  67. Get Palette 0
  68.  
  69. 'Gr Writing 3
  70.  
  71. Repeat 
  72.    XX=X Screen(X Mouse)
  73.    YY=Y Screen(Y Mouse)
  74.    If TEMPX<>XX and TEMPY<>YY
  75.       If XX>X and YY>Y
  76.          Cls 0
  77.          Zoom 0,X,Y,X+SIZEX,Y+SIZEY To 1,X,Y,XX,YY
  78.       End If 
  79.    End If 
  80.    TEMPX=XX : TEMPY=YY
  81. Until Mouse Click=1
  82.  
  83. Get Bob 1,1,X,Y To XX,YY